namespace OasisCiq.Xnl
{
    // TODO: XLink attributes

    using System.Collections.Generic;
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using XS;

    /// <summary>
    /// Reusable complex type for a party. A party is a person or an organisation
    /// </summary>
    public class PartyNameType : IDataQualityGroup, IValidityDateGroup, ILanguageCodeGroup, IXLink, IExtendedAttributes
    {
        public ICollection<NameLine> NameLines { get; set; }

        public ICollection<PersonNameType> PersonNames { get; set; }

        public ICollection<OrganisationNameType> OrganisationNames { get; set; }

        /// <summary>
        /// A unique identifier of a party
        /// </summary>
        public CTString PartyNameId { get; set; }

        /// <summary>
        /// Type of Party Name ID
        /// </summary>
        public PartyNameIdTypeList PartyNameIdType { get; set; }

        /// <summary>
        /// Globally unique identifier
        /// </summary>
        public CTString Id { get; set; }

        /// <summary>
        /// Type of use of this data. e.g. data exchange, contact, update, create
        /// </summary>
        public PartyNameUsageList Usage { get; set; }

        /// <summary>
        /// Status of the entity. e.g. Old, Current, Inactive, Active, etc
        /// </summary>
        public StatusList Status { get; set; }

        /// <summary>
        /// The connector used to join more than one person name.
        /// <example>
        /// Mr Hunt AND Mrs Clark, where AND is the JointNameConnector.
        /// The flow is from the preceding to the following.
        /// If there is more than 2 names then all names are connected using
        /// this connector in the natural order.
        /// </example>
        /// </summary>
        public JointNameConnectorList JointNameConnector { get; set; }

        public XSDateTime DateValidFrom { get; set; }

        public XSDateTime DateValidTo { get; set; }

        public NameKeyGroup NameKey { get; set; }

        public DataQualityTypeList DataQualityType { get; set; }

        public XSDateTime ValidFrom { get; set; }

        public XSDateTime ValidTo { get; set; }

        public XSLanguage LanguageCode { get; set; }

        public NameValueCollection ExtendedAttributes { get; set; }
    }
}